home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: news.sprintlink.net!news1!MAUI
- From: jeffl@inter-intelli.com (Jeff Lindholm)
- Subject: Re: Simple program-but not for me!!HELP.
- X-Nntp-Posting-Host: inter6.inter-intelli.com
- Message-ID: <DKz0ur.4u@iquest.net>
- Sender: news@iquest.net (News Admin)
- Organization: Interactive Intelligence, Inc.
- X-Newsreader: News Xpress Version 1.0 Beta #3
- References: <4cu9jm$s8h@mercury.hgmp.mrc.ac.uk>
- Date: Wed, 10 Jan 1996 18:10:09 GMT
-
- In article <4cu9jm$s8h@mercury.hgmp.mrc.ac.uk>,
- Mark Bradburn <m-bradbu@nimr.mrc.ac.uk> wrote:
- >I have an output file from a program that comes in the form:-
- >
- >'Sequence = name1, Structure = name2, SCORE = xxx.xx
- > " name2 " othername1, "
- > " othername1 " othername2, "
- >etc.'
- >
- >What i need to do is extract the scores values from each line,sort them
- >according to (name
- > with name,name with othername,othername with othername) then write the
- >sum,mean and sd for each to seperate files.How is the easiest way to do
- >this,bearing in mind i am just about competent with while (if) and other loop
- >commands and am virtually lost with 'for' statements.
- >
- > Thanks in advance for any help..
- >
- > -Mark
-
- Try using strtok to break the line apart. That should start you in the general
- direction. Is this perchance a class project?
-
- Jeff
-